package com.ocom.webapi;

import com.alibaba.fastjson.JSON;
import com.google.gson.Gson;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@SpringBootTest
public class Base64Test5 {


	/**
	穗康码
	 */

	@Test
	public static void main(String[] args) {

		String td = "eyJkYXRhIjoiW3tcImhzMV9yZXN1bHRcIjp7XCJlcnJjb2RlXCI6MCxcImRhdGFcIjp7XCJtZXRhZGF0YVwiOntcInRvdGFsXCI6XCIzXCJ9LFwiZGF0YVwiOlt7XCJqY19ycVwiOlwiMjAyMi0wNC0xMCAyMjozMDo1NFwiLFwiZ2pcIjpcIuS4reWbvVwiLFwiempseFwiOlwi5bGF5rCR6Lqr5Lu96K+BXCIsXCJqY19qZ1wiOlwi5bm/5bee5biC5aSp5rKz5Yy655a+55eF6aKE6Ziy5o6n5Yi25Lit5b+DXCIsXCJqY2pnXCI6XCLpmLTmgKdcIixcInpqaG1cIjpcIjQ0MDEwNTE5NjUwODI1MDA3NVwiLFwieHh6amJoXCI6XCI1NzUwMGU3YzUzOGM0YjM3OTFmOWQ2MWIyNGIyZDIwMFwiLFwiY2pfcnFcIjpcIjIwMjItMDQtMTAgMTU6MzA6MDBcIixcInhtXCI6XCLpmYjplItcIn0se1wiamNfcnFcIjpcIjIwMjItMDQtMTAgMDE6MjA6MDBcIixcImdqXCI6XCLkuK3lm71cIixcInpqbHhcIjpcIuWxheawkei6q+S7veivgVwiLFwiamNfamdcIjpcIuW5v+W3nuW4guWkqeays+WMuueWvueXhemihOmYsuaOp+WItuS4reW/g1wiLFwiamNqZ1wiOlwi6Zi05oCnXCIsXCJ6amhtXCI6XCI0NDAxMDUxOTY1MDgyNTAwNzVcIixcInh4empiaFwiOlwiZjc1NzZlNmQzZjc1NDI5YWIzYjU5ZDI1NjMzZTJjNWRcIixcImNqX3JxXCI6XCIyMDIyLTA0LTA5IDE1OjAwOjAwXCI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9fSx7XCJpZGVudGl0eV9yZXN1bHRcIjp7XCJpZGVudGl0eVwiOlwiNDQwMTA1MTk2NTA4MjUwMDc1XCJ9fV0ifQ==";

		byte[] yt6 = Base64.getDecoder().decode(td.getBytes(StandardCharsets.UTF_8));
		String uy = new String(yt6);

		Gson gson = new Gson();
		Map<String, Object> map = gson.fromJson(uy, Map.class);


		List<Map> list = gson.fromJson((String) map.get("data"), List.class);


		Map<String, Object> stringObjectMap = new HashMap<>();

		for (Map<String, Object> map1 : list) {
			for (Map.Entry entry : map1.entrySet()) {
				stringObjectMap.put((String) entry.getKey(), entry.getValue());
			}
		}

		Map<String, Object> map1 = gson.fromJson("{\"codeId\":\"e3a990a6ca8c702dacb4de939981325e\",\"zoning\":\"440100\",\"s\":\"b0bb4e805f74f3cda56ff3fe6e6b0051f56bcfadf766b256\"}", Map.class);

		Map<String, Object> objectMap = new HashMap<>();
		objectMap.put("encry", stringObjectMap);
		objectMap.put("data", map1);
		objectMap.put("operateType", 5);
		objectMap.put("openState", 1);

		System.out.println(JSON.toJSONString(objectMap));

	}

}
